FROM java:8

# 作者信息
MAINTAINER "Virens <loioi@virens.cn>" 

# 定义基础变量
ENV APP_NAME ccqlk-ludeng-common-cl-def

# 更镜像源
RUN echo "">/etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib">>/etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/debian/ jessie-updates main non-free contrib">>/etc/apt/sources.list

COPY target/$APP_NAME-package.zip /temp/$APP_NAME.zip

# 应用配置
RUN unzip -o -d /app /temp/$APP_NAME.zip
RUN rm -f /temp/$APP_NAME.zip
RUN chmod 755 /app/start.sh

# 复制配置及资源文件
COPY resources/* /app/classes/

ENTRYPOINT ["java","-classpath",".:/app/classes:/app/lib/*","cn.virens.App"]